<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			//计算100以内（包括100）的偶数之和
			var i=0;
			var sum=0;
			while(i<=100){
				sum=sum+i;
				i=i+2;
			}		
			alert(sum);
		</script>
	</body>
</html>
